package com.just.just_bankreputationsystem.Service.BankServiceImpl;

import com.just.just_bankreputationsystem.Mapper.TypeMapper;
import com.just.just_bankreputationsystem.Model.Type;
import com.just.just_bankreputationsystem.Service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sun.font.Type1GlyphMapper;

import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {
    @Autowired
    private TypeMapper typeMapper;
    @Override
    public int typeAdd(Type type) {
        return typeMapper.add(type);
    }

    @Override
    public List<Type> selectAlltype() {
        return typeMapper.show();
    }

    @Override
    public void delTypeById(int id) {
        typeMapper.delType(id);
    }

    @Override
    public Type selectTypeById(int id) {
        return typeMapper.selectType(id);
    }

    @Override
    public int updateType(Type type) {
        return typeMapper.update(type);
    }
}
